define(['util/Knockout'], function(ko) {

	var card = function(type, suit, usable) {
		var self = this;
		
		self.type = type;
		
		self.suit = suit;

		self.usable = usable;
		
		self.cardName = ko.computed(function() {
			return "{0}-{1}".format(self.type.toLowerCase(), self.suit.toLowerCase());
		}, this);
		
		self.cardClass = ko.computed(function() {
			return "{0} {1} {2}".format("card", self.type.toLowerCase(), self.suit.toLowerCase());
		}, this);

		self.cardClassSelector = ko.computed(function() {
			return ".{0}.{1}.{2}".format("card", self.type.toLowerCase(), self.suit.toLowerCase());
		}, this);
				
		self.equals = function(card) {
			return self.type == card.type && self.suit == card.suit;
		};
	};

	return card;
	
});